<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<% String path = request.getContextPath();%>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>
<!DOCTYPE html>
<html>

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,Chrome=1">
    <!-- Google Chrome Frame也可以让IE用上Chrome的引擎: -->
    <meta name="renderer" content="webkit">
    <!--国产浏览器高速模式-->
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <meta name="author" content="穷在闹市" />
    <!-- 作者 -->
    <meta name="revised" content="穷在闹市.v3, 2019/05/01" />
    <!-- 定义页面的最新版本 -->
    <meta name="description" content="网站简介" />
    <!-- 网站简介 -->
    <meta name="keywords" content="搜索关键字，以半角英文逗号隔开" />
    <title>baohan</title>

    <!-- 公共样式 开始 -->
    <script type="text/javascript" src="<%=path%>/static/js/jquery-3.5.1.min.js"></script>
    <link rel="stylesheet" type="text/css" href="<%=path%>/static/css/base.css">
    <link rel="stylesheet" type="text/css" href="<%=path%>/static/css/iconfont.css">
    <script type="text/javascript" src="<%=path%>/static/js/jquery-1.11.3.min.js"></script>
    <link rel="stylesheet" type="text/css" href="<%=path%>/static/layui/css/layui.css">
    <script type="text/javascript" src="<%=path%>/static/layui/layui.js"></script>
    <!-- 滚动条插件 -->
    <link rel="stylesheet" type="text/css" href="<%=path%>/static/css/jquery.mCustomScrollbar.css">
    <script src="<%=path%>/static/js/jquery-ui-1.10.4.min.js"></script>
    <script src="<%=path%>/static/js/jquery.mousewheel.min.js"></script>
    <script src="<%=path%>/static/js/jquery.mCustomScrollbar.min.js"></script>
    <script src="<%=path%>/static/js/cframe.js"></script><!-- 仅供所有子页面使用 -->
    <!-- 公共样式 结束 -->

    <style>
        .layui-form-label{
            width: 100px;
            font-weight: bold;
        }
        .layui-input-block{
            margin-left: 130px;
            line-height: 36px;
        }
        .layui-form{
            margin-right: 30%;
        }

    </style>

</head>

<body>
<div class="cBody">
    <form id="addForm" class="layui-form" method="post" action="<%=path%>/examine/travelList">
        <div class="layui-form-item">
            <label class="layui-form-label">申请人：</label>
            <div class="layui-input-block">
                ${requestScope.suppliterTravel.systemUser.name}
                <%--<input type="text" name="goodsName" required lay-verify="required" autocomplete="off" class="layui-input">--%>
            </div>
        </div>
        <%--<div class="layui-form-item">
            <label class="layui-form-label">商品图片</label>
            <div class="layui-upload-drag" id="goodsPic">
                <i class="layui-icon"></i>
                <p>点击上传，或将文件拖拽到此处</p>
            </div>
        </div>--%>
        <div class="layui-form-item">
            <label class="layui-form-label">出差人数：</label>
            <div class="layui-input-block">
                ${requestScope.suppliterTravel.travelPersonCount}
                <%--<input type="text" name="company" required lay-verify="required" autocomplete="off" class="layui-input">--%>
            </div>
        </div>
        <div class="layui-form-item">
            <label class="layui-form-label">出差目的：</label>
            <div class="layui-input-block">
                ${requestScope.suppliterTravel.purpose}
                <%--<input type="text" name="price" required lay-verify="required|number" autocomplete="off" class="layui-input">--%>
            </div>
        </div>
        <div class="layui-form-item">
            <label class="layui-form-label">计划出差日期：</label>
            <div class="layui-input-block">
                <fmt:formatDate value="${requestScope.suppliterTravel.planDate}" pattern="yyyy-MM-dd"/>
                <%--<input type="password" name="password" autocomplete="off" class="layui-input">--%>
            </div>
        </div>
        <div class="layui-form-item">
            <label class="layui-form-label">预计出差天数：</label>
            <div class="layui-input-block">
                ${requestScope.suppliterTravel.days}
                <%--<input type="password" name="password2" autocomplete="off" class="layui-input">--%>
            </div>
        </div>
        <div class="layui-form-item">
            <label class="layui-form-label">行程计划：</label>
            <div class="layui-input-block">
                ${requestScope.suppliterTravel.travelPlan}
               <%-- <textarea name="desc" class="layui-textarea"></textarea>--%>
            </div>
        </div>
        <div class="layui-form-item" style="bottom: 15px">
            <label class="layui-form-label">内容计划：</label>
            <div class="layui-input-block">
                ${requestScope.suppliterTravel.contentPlan}
                <%--<textarea name="desc" class="layui-textarea"></textarea>--%>
            </div>
        </div>
        <%--<div class="layui-form-item">
            <label class="layui-form-label">是否是批发商品</label>
            <div class="layui-input-block">
                <input type="radio" name="sfpfsp" value="nan" title="是">
                <input type="radio" name="sfpfsp" value="nv" title="否" checked>
            </div>
        </div>--%>
        <div class="layui-form-item" style="top: 15px;">
            <label class="layui-form-label">审核人：</label>
            <div class="layui-input-inline" style="margin-bottom: 15px">
                <input type="text" name="auditUser" lay-verify="auditUser" class="layui-input" value="${requestScope.suppliterTravel.auditUser}">
                <%--<select name="provid" id="provid" lay-filter="provid">
                    <option value="1">李四</option>
                    <option value="2">王五</option>

                </select>--%>
            </div>
            <div class="layui-form-item"style="margin-top: 15px;">
                <label class="layui-form-label">审核人意见：</label>
                <div class="layui-input-block">
                    <textarea name="auditOpinion" lay-verify="auditOpinion" class="layui-textarea">${requestScope.suppliterTravel.auditOpinion}</textarea>
                </div>
            </div>
        </div>
        <div class="layui-form-item">
            <label class="layui-form-label">状态</label>
            <div class="layui-input-block">
                <input type="radio" name="auditState" value="1" title="通过" checked>
                <input type="radio" name="auditState" value="0" title="驳回">
            </div>
        </div>
        <input type="hidden" name="id" value="${param.id}">
        <div class="layui-form-item">
            <div class="layui-input-block">
                <input class="layui-btn" lay-submit lay-filter="submitBut" type="submit" value="立即提交">
                <button type="reset" class="layui-btn layui-btn-primary">重置</button>
            </div>
        </div>
    </form>


    <script>
        var layer = window.top.layer;
        var index = layer.getFrameIndex(window.name);//先得到当前iframe层的索引
        layui.use(['upload','form'], function() {
            var form = layui.form;
            //监听提交
            form.on('submit(submitBut)', function(obj) {
               parent.location.reload(); //刷新父页面
               layer.close(index); //执行关闭
            });

            form.verify({
                auditUser:[
                    /^[\u4e00-\u9fa5]{2,5}$/, '您的输入有误，请输入2-5位中文'
                ],
                auditOpinion:function (value) {
                    if(value==""){
                        return "请输入审核意见";
                    }
                }//数组的两个值分别代表：[正则匹配、匹配不符时的提示文字]
            });
        });
    </script>
</div>
</body>

</html>
